package com.chinanet.service.faultanticipate;

import com.chinanet.entry.faultanticipate.Branch;
import com.chinanet.entry.faultanticipate.Detail;
import com.chinanet.entry.faultanticipate.Model;
import com.chinanet.entry.faultanticipate.Record;
import com.chinanet.event.entry.RecordExecuteEvent;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.math.BigDecimal;

public interface IDetailService {
    public long copy(Detail detail);
    public long save(Detail detail, Model model, Branch branch);
    public long load(Detail detail, Model model, Branch branch,BigDecimal aim);
    public Record getRecordByDetail(long detailId);
    public long updateByBranch(Detail detail,Model model, Branch branch,Branch lastBranch);
    public long updateByCopy(Record record, Branch currentBranch);
    public void handleAfterRecordExecuteComplete(RecordExecuteEvent event);
    public Page<Detail> getAllByRole(String search,long roleId, Pageable pageable);
    public Page<Detail> getAllByRole(long roleId, Pageable pageable);
}